<?php

class Application_Form_NoticeAdd extends Zend_Form
{

    public function init()
    {
        $this->setName('noticeadd');
        $this->setMethod('POST');
        
        $ntitle =  new Zend_Form_Element_Text('ntitle');
        $ntitle->setLabel('公告标题')
                ->setRequired(true)
                ->setAttrib('class','border')
                ->setAttrib('MaxLength', '64')
                ->addValidator('NotEmpty');
        
        $ncontent = new Zend_Form_Element_Textarea('ncontent');
        $ncontent->setLabel('公告内容')
                ->setRequired(true)
                ->setAttrib('rows','20')
                ->setAttrib('cols','80')
                ->setAttrib('class','border')
                ->addValidator('NotEmpty');
        
        $naddsubmit = new Zend_Form_Element_Submit('naddsubmit');
        $naddsubmit->setLabel('发布公告')
                ->setAttrib('id','naddsubmit')
                ->setAttrib('class','submit');
        
        $this->addElements(array(
            $ntitle,
            $ncontent,
            $naddsubmit
        ));
    }


}

